import React from 'react';
import {
  Route,
  Redirect,
} from 'react-router-dom';

import NewsList from '../pages/news/index';
import NewsDetail from '../pages/news/detail';

export default () => [
  <Route path="/" render={() => <Redirect to="/list" />} exact key="index" />,
  <Route path="/list" component={NewsList} key="list" />,
  <Route path="/detail" component={NewsDetail} key="detail" />,
]